home *** CD-ROM | disk | FTP | other *** search
/ Merciful 2 / Merciful - Disc 2.iso / software / d / digitaluniversev1.01a.dms / digitaluniversev1.01a.adf / MUI-Install < prev    next >
Text File  |  1995-09-19  |  5KB  |  188 lines

  1. ;***** MagicUserInterface Installation Script
  2.  
  3. (transcript "Installing Magic User Interface...")
  4. (set @default-dest "SYS:")
  5.  
  6. ;***** Introduction
  7. (complete 0)
  8.  
  9. (message
  10.     "The installation procedure has changed significantly since version 2.0 of "
  11.     "MagicUserInterface. Instead of spreading the MUI related files all "
  12.     "over your system, one single MUI directory will be created at some place "
  13.     "of your choice. This directory will hold all necessary programs and "
  14.     "libraries to use MUI."
  15. )
  16.  
  17. ;***** Old File Deletion
  18. (complete 5)
  19.  
  20. (if (<> (exists "sys:classes/mui") 0)
  21. (
  22.     (if (askbool (help @askbool-help) (prompt "Some old MUI stuff is in your libs: drawer. Do you want to delete it now?"))
  23.     (
  24.         (if (<> (exists "sys:libs/muimaster.library") 0)
  25.         (
  26.             (delete
  27.                 ("sys:libs/muimaster.library")
  28.                 (prompt "Deleting old muimaster.library...")
  29.                 (help @deletefile-help)
  30.             )
  31.         )
  32.         )
  33.  
  34.         (foreach "sys:Classes/MUI" "#?.mui"
  35.             (delete
  36.                 (tackon "sys:Classes/MUI" @each-name)
  37.                 (help @deletefile-help)
  38.             )
  39.         )
  40.  
  41.         (if (<> (exists "sys:Classes/Images") 0)
  42.         (
  43.             (foreach "sys:Classes/Images" "mui#?.image"
  44.                 (delete
  45.                     (tackon "sys:Classes/Images" @each-name)
  46.                     (help @deletefile-help)
  47.                 )
  48.             )
  49.         )
  50.         )
  51.  
  52.         (delete
  53.             ("sys:Classes/MUI")
  54.             (help @deletefile-help)
  55.         )
  56.     )
  57.     )
  58. )
  59. )
  60.  
  61. (if (<> (exists "sys:prefs/mui") 0)
  62. (
  63.     (if (askbool (help @askbool-help) (prompt "The old preferences program is obsolete. Do you want to delete it now?"))
  64.     (
  65.         (delete
  66.             ("sys:Prefs/MUI")
  67.             (help @deletefile-help)
  68.         )
  69.         (delete
  70.             ("sys:Prefs/MUI.info")
  71.             (help @deletefile-help)
  72.         )
  73.     )
  74.     )
  75. )
  76. )
  77.  
  78. (if (<> (exists "sys:prefs/MUI-Images") 0)
  79. (
  80.     (if (askbool (help @askbool-help) (prompt "The images in sys:prefs/MUI-Images have moved. Do you want to delete it now? CAUTION: If you have added some extra images here, be sure to copy them somewhere else before proceeding!"))
  81.     (
  82.         (run "delete sys:Prefs/MUI-images#? all >nil:")
  83.     )
  84.     )
  85.  
  86.     (if (askbool (help @askbool-help) (prompt "Due to the new directory structure, your old preferences settings are no longer valid and must be deleted. This will not affect window positions and application private settings. Please don't worry, instead take a look at the prefs program's preset menu when reconfiguring MUI. Do you want to delete the old settings now?"))
  87.     (
  88.         (run "delete envarc:mui/#?.prefs >nil:")
  89.         (run "delete envarc:mui/MUIPREFS.cfg >nil:")
  90.     )
  91.     )
  92. )
  93. )
  94.  
  95. (if (<> (exists "sys:locale/catalogs/Deutsch/MUI.catalog" (noreq)) 0)
  96. (
  97.     (delete
  98.         ("sys:locale/catalogs/Deutsch/MUI.catalog")
  99.         (help @deletefile-help)
  100.     )
  101. )
  102. )
  103.  
  104.  
  105.  
  106. ;***** Destination Directory Selection & Creation
  107. (complete 10)
  108.  
  109. (if (<> (exists "mui:" (noreq)) 0)
  110. (
  111.     (if (<> (exists "mui:MUI-Install" (noreq)) 0)
  112.     (
  113.         (set muimsg "Please select a place for \"MagicUserInterface\". A drawer called \"MUI\" will be created here. Since this archive just contains the essential MUI files, only about 500K will be required.")
  114.     )
  115.     (
  116.         (set @default-dest "mui:/")
  117.         (set muimsg "MUI is already installed on your system. Press \"Proceed\" to update your installation or select a different path for the \"MUI\" drawer.")
  118.     )
  119.     )
  120. )
  121. (
  122.     (set muimsg "Please select a place for \"MagicUserInterface\". A drawer called \"MUI\" will be created here. Since this archive just contains the essential MUI files, only about 500K will be required.")
  123. )
  124. )
  125.  
  126. (set @default-dest (expandpath @default-dest))
  127.  
  128. (set destination
  129.     (askdir
  130.         (prompt muimsg)
  131.         (help @askdir-help)
  132.         (default @default-dest)
  133.     )
  134. )
  135.  
  136. (set @execute-dir destination)
  137. (set @default-dest destination)
  138. (set destination (tackon destination "MUI"))
  139.  
  140. (if (= (exists destination) 2)
  141. (message
  142.     "A MUI drawer does already exist in the selected directory. By selecting \"Proceed\", "
  143.     "you indicate that you want to update the MUI installation with the "
  144.     "most recent version. Several MUI specific files will be overwritten!"
  145. )
  146. )
  147.  
  148. (copyfiles (source "DU_1:unlha") (dest "RAM:"))
  149. (askdisk
  150.         (prompt "Please insert the disk labelled \"The Digital Universe Disk 14\"")
  151.         (help @askdisk-help)
  152.         (dest "DU_14")
  153. )
  154. (working "Extracting MUI files...")
  155. (run "RAM:unlha xf DU_14:mui23.lha")
  156. (delete "RAM:unlha")
  157.  
  158. ;***** Startup-Sequence
  159. (complete 95)
  160.  
  161. (startup "MUI"
  162.     (prompt "Some required commands will be added to your \"s:user-startup\" file.")
  163.     (help @startup-help)
  164.     (command "if exists \"" destination "\"\n")
  165.     (command "   assign MUI: \"" destination "\"\n")
  166.     (command "   if exists MUI:Libs\n")
  167.     (command "      assign add LIBS: MUI:Libs\n")
  168.     (command "   endif\n")
  169.     (command "   if exists MUI:Locale\n")
  170.     (command "      assign add LOCALE: MUI:Locale\n")
  171.     (command "   endif\n")
  172.     (command "   version >nil: exec.library 39\n")
  173.     (command "   if not warn\n")
  174.     (command "      if exists MUI:Docs\n")
  175.     (command "         if exists HELP:dummy ; do not remove\n")
  176.     (command "         endif                ; this entry!\n")
  177.     (command "         assign add HELP: MUI:Docs\n")
  178.     (command "      endif\n")
  179.     (command "   endif\n")
  180.     (command "endif")
  181. )
  182.  
  183.  
  184. ;***** Finished
  185. (complete 100)
  186.  
  187. (exit "Please reboot your computer before trying to start any MUI programs.")
  188.